package com.example.stock.entity.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.stock.entity.eo.CreateEo;
import com.example.stock.entity.mapper.CreateMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CreateDao extends ServiceImpl<CreateMapper, CreateEo> {


    public List<CreateEo> listByOrder() {
        LambdaQueryWrapper<CreateEo> createEoLambdaQueryWrapper = Wrappers.<CreateEo>lambdaQuery().orderByDesc(CreateEo::getTrDate);
        return list(createEoLambdaQueryWrapper);
    }
}